<template>
    <span v-if="isFontAwesome" class="EachApp" :class="icon" :style="{fontSize:size+'px'}"></span>
	<component v-else :is="icon" :style="{fontSize:size+'px'}" />
</template>

<script setup lang="ts">
import incofont from '@/styles/font/iconfont.json';
const startStr = incofont?.css_prefix_text;
const props = defineProps({
	icon: {
		type: String,
		default: ""
	},
	size:{
		type: Number,
		default: 16
	}
});
// 示例：判断 icon 是否以 'EachApp_' 开头
const isFontAwesome = computed(() => props.icon.startsWith('EachApp_'));
</script>

<style scoped>
span{
	line-height: 1;
}
</style>
